package com.iu.eblood.model;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the EVENTUSERRESPONSE database table.
 * 
 */
@Entity
public class Eventuserresponse implements Serializable {
	
	private static final long serialVersionUID = 1L;
	private long eurid;
	private Timestamp createddate;
	private Timestamp deleteddate;
	private String isactive;
	private Event event;
	private Task task;
	private Userresponsestate userresponsestate;
	private User user;
	private List<Eventuserresponsestate> eventuserresponsestates;

    public Eventuserresponse() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	public long getEurid() {
		return this.eurid;
	}

	public void setEurid(long eurid) {
		this.eurid = eurid;
	}


	public Timestamp getCreateddate() {
		return this.createddate;
	}

	public void setCreateddate(Timestamp createddate) {
		this.createddate = createddate;
	}


	public Timestamp getDeleteddate() {
		return this.deleteddate;
	}

	public void setDeleteddate(Timestamp deleteddate) {
		this.deleteddate = deleteddate;
	}


	public String getIsactive() {
		return this.isactive;
	}

	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}


	//bi-directional many-to-one association to Event
    @ManyToOne
	@JoinColumn(name="EVENTID")
	public Event getEvent() {
		return this.event;
	}

	public void setEvent(Event event) {
		this.event = event;
	}
	

	//bi-directional many-to-one association to Task
    @ManyToOne
	@JoinColumn(name="TASKID")
	public Task getTask() {
		return this.task;
	}

	public void setTask(Task task) {
		this.task = task;
	}
	

	//bi-directional many-to-one association to Userresponsestate
    @ManyToOne
	@JoinColumn(name="CURRENTSTATEID")
	public Userresponsestate getUserresponsestate() {
		return this.userresponsestate;
	}

	public void setUserresponsestate(Userresponsestate userresponsestate) {
		this.userresponsestate = userresponsestate;
	}
	

	//bi-directional many-to-one association to User
    @ManyToOne
	@JoinColumn(name="USERID")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	

	//bi-directional many-to-one association to Eventuserresponsestate
	@OneToMany(mappedBy="eventuserresponse")
	public List<Eventuserresponsestate> getEventuserresponsestates() {
		return this.eventuserresponsestates;
	}

	public void setEventuserresponsestates(List<Eventuserresponsestate> eventuserresponsestates) {
		this.eventuserresponsestates = eventuserresponsestates;
	}
	
}